<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%String path = request.getContextPath();%>
<%@ taglib uri="/WEB-INF/tld/c.tld" prefix="c" %>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <c:set var="ctx" value="${pageContext.request.contextPath}"/>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>付款记录</title>
    <jsp:include page="../../import.jsp" flush="true"/>
</head>
<script type="text/javascript">
    var grid = null;
    $(function () {
        var _url = '<%=path%>/custpay/mcrLoanRec/initList.do';
        $("#ligergrid1").ligerGrid({
            url: _url,
            method: 'get',
            columns: [
                {display: '订单号', name: 'id', align: 'left', width: 200},
                {display: '账单ID', name: 'billId', align: 'left', width: 200},
                {display: '支付平台', name: 'payTypeNm', align: 'left', width: 100},
                {display: '收款人账户名', name: 'accountName', align: 'left', width: 100},
                {display: '收款账号', name: 'accountNumber', align: 'left', width: 200},
                {display: '银行名称', name: 'bankName', align: 'left', width: 100},
                {display: '手机号码', name: 'phoneNumber', align: 'left', width: 150},
                {display: '金额（元）', name: 'amount', align: 'left', width: 100},
                {display: '交易状态', name: 'isSucNm', align: 'left', width: 100},
                {display: '结果描述', name: 'resultDesc', align: 'left', width: 250},
                {display: '放款时间', name: 'payTime', align: 'left', width: 150, render: renderDate}
            ],
            pageSize: 10,
            root: 'rows',
            record: 'total',
            hideLoadButton: true,
            width: '100%',
            height: '100%',
            heightDiff: -2,
            checkbox: false,
            rownumbers: true,
            allowUnSelectRow: true,
            alternatingRow: false,
            onBeforeShowData: function () {
                var grid = this;
                grid.collapsedRows = [];
            }
        });
        grid = liger.get("ligergrid1");
        grid.setHeight(100);
        $("#searchBar").ligerForm();

        $("#searchBtn").click(function (event) {
            var form = new liger.get("searchBar");
            var data = form.getData();
            for (name in data) {
                grid.setParm(name, data[name]);
            }
            grid.reload($('.pcontrol input', grid.toolbar).val());
        });

        $("#clearBtn").click(function (event) {
            $("#resetBtn").click();  //重置 input-text
        });
    });
    //格式化时间
    function renderDate(rowdata, index, value) {
        var dateStr = "";
        if (null != value) {
            var date = new Date(value);
            dateStr = DateUtils.formatDate(date, DateUtils.YYYY_MM_DDHHMMSS);
        }
        return dateStr;
    }
</script>

<body class="iframeBody">
<div class="Wrapper">
    <div class="searchArea">
        <form id="searchBar">
            <div class="fieldset1 clearFix">
                <div class="fieldBox">
                    <div class="label">订单号</div>
                    <div class="field">
                        <input name="orderId" id="orderId" type="text" class="ui-textbox" value="">
                    </div>
                </div>
                <div class="fieldBox">
                    <div class="label">收款人账户名</div>
                    <div class="field">
                        <input name="accountName" id="accountName" type="text" class="ui-textbox" value="">
                    </div>
                </div>
                <div class="fieldBox">
                    <div class="label">收款账号</div>
                    <div class="field">
                        <input name="accountNumber" id="accountNumber" type="text" class="ui-textbox" value="">
                    </div>
                </div>
                <div class="fieldBox">
                    <div class="label">银行名称</div>
                    <div class="field">
                        <input name="bankName" id="bankName" type="text" class="ui-textbox" value="">
                    </div>
                </div>
                <div class="fieldBox col_100">
                    <div class="label">支付平台</div>
                    <div class="field">
                        <select name="payType" id="payTypeSearch" data-value=" ">
                            <option value=" " seleted>请选择</option>
                            <c:forEach items="${payChlCdList }" var="kv">
                                <option value="${kv.key }">${kv.value }</option>
                            </c:forEach>
                        </select>
                    </div>
                </div>
                <div class="fieldBox col_100">
                    <div class="label">交易状态</div>
                    <div class="field">
                        <select name="isSuc" id="isSucSearch" data-value=" ">
                            <option value=" " seleted>请选择</option>
                            <c:forEach items="${transStatusCdlist }" var="kv">
                                <option value="${kv.key }">${kv.value }</option>
                            </c:forEach>
                        </select>
                    </div>
                </div>
                <div class="fieldBox col_33">
                    <div class="label">还款时间(起)</div>
                    <div class="field">
                        <input name="payTimeBegin" id="payTimeBegin" type="text" class="ui-datepicker" value="">
                    </div>
                </div>
                <div class="fieldBox col_33">
                    <div class="label">还款时间(止)</div>
                    <div class="field">
                        <input name="payTimeEnd" id="payTimeEnd" type="text" class="ui-datepicker" value="">
                    </div>
                </div>
                <div class="clearFix"></div>
                <div class="btnsBox formBtns notRight">
                    <span id="searchBtn" class="sq-button-round">查询</span>
                    <span id="clearBtn" class="sq-button-round">清空</span>

                    <input id="resetBtn" type="reset" value="重置" class="l-button l-button-reset Hide"/>
                </div>
            </div>
        </form>
    </div>
</div>
<div id="ligergrid1" class="sq-grid"></div>
</body>
</html>